function goPage(pno,psize){
    var mytable = document.getElementById("content");
    var num = mytable.rows.length;//表格所有行数(所有记录数)
    var totalPage = 0;//总页数
    var pageSize = psize;//每页显示行数
    //总共分几页 
    if(num/pageSize > parseInt(num/pageSize)){   
            totalPage=parseInt(num/pageSize)+1;   
       }else{
           totalPage=parseInt(num/pageSize);   
       }
    var currentPage = pno;//当前页数
    var startRow = (currentPage - 1) * pageSize+1;//开始显示的行
    var endRow = currentPage * pageSize;//结束显示的行
    endRow = (endRow > num)? num : endRow;
       //遍历显示数据实现分页
    for(var i=1;i<(num+1);i++){
        var irow = mytable.rows[i-1];
        if(i>=startRow && i<=endRow){
            irow.style.display = "";
        }else{
            irow.style.display = "none";
        }
    }
    var tempStr = '<div style="display:inline; float: right;"><span>Total '+num+'</span><span style="padding-left:20px;">Page '+currentPage+'</span></div>';
    if(currentPage>1){
        tempStr += "<a style='text-decoration:none;'  href=\"#\" onClick=\"goPage("+(1)+","+psize+")\">Home</a>";
        tempStr += "<a style='text-decoration:none;'  href=\"#\" onClick=\"goPage("+(currentPage-1)+","+psize+")\">&lt;Previous</a>";
    }else{
	//第一页禁用
        tempStr += "<a style='border-color:#ccc;color:#ccc;text-decoration:none;'>Home</a>";
        tempStr += "<a style='border-color:#ccc;color:#ccc;text-decoration:none;'>&lt;Previous</a>";
    }

    if(currentPage<totalPage){
        tempStr += "<a style='text-decoration:none; ' href=\"#\" onClick=\"goPage("+(currentPage+1)+","+psize+")\"> Next></a>";
        tempStr += "<a style='text-decoration:none; ' href=\"#\" onClick=\"goPage("+(totalPage)+","+psize+")\">Tail</a>";
    }else{
	//到最后一页禁用
        tempStr += "<a style='border-color:#ccc;color:#ccc;text-decoration:none;' > Next></a>";
        tempStr += "<a style='border-color:#ccc;color:#ccc;text-decoration:none;' >Tail</a>"; 
    }
	
	document.getElementById("barcon").innerHTML = tempStr;
};